"""
    任意给定一个自然数，若它为偶数则除以 2，若它为奇数则乘以 3 再加 1，得到一个新的自然数，按照这样的方法计算下去，最终的结果必将是 1
    比如给定的自然数是5，则 5 * 3 + 1 = 16 -> 16 / 2 = 8 -> 8 / 2 = 4 -> 4 / 2 = 2 -> 2 / 2 = 1。
"""

if __name__ == "__main__":
    number = int(input("请输入一个自然数："))
    while number % 2 == 0:
        print(number, "/2", " = ", number // 2)
        number = number // 2
        if number == 1:
            break
        elif number % 2 != 0:
            print(number, "*3+1", " = ", number*3+1)
            number = number * 3 + 1
        else:
            continue
    else:
        print(number, "*3+1", " = ", number * 3 + 1)
        number = number * 3 + 1
        while number % 2 == 0:
            print(number, "/2", " = ", number // 2)
            number = number // 2
            if number == 1:
                break
            elif number % 2 != 0:
                print(number, "*3+1", " = ", number * 3 + 1)
                number = number * 3 + 1
            else:
                continue